import {post_json,get,post} from '../../http/axios'
export default{
    namespaced:true,
    state:{
        addressId:[]
    },
    getters:{},
    mutations:{
        setAddressId(state,data){
            state.addressId =data
        }
    },
    actions:{
        async saveAddress(context,params){
            let res = await post('/address/saveOrUpdate',params)
        },
        async loadAddressId(context,params){
            let res = await get('/address/findByCustomerId?id='+params)
            context.commit('setAddressId',res.data)
        },
        async toDeleteId(context,params){
            let res = await get('/address/deleteById?id='+params)
        }
    }
}